.class public Lcom/esfile/screen/recorder/videos/edit/activities/speed/c;
.super Ljava/lang/Object;
.source "SpeedDialog.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/esfile/screen/recorder/videos/edit/activities/speed/c$e;
    }
.end annotation


# instance fields
.field private a:Lcom/esfile/screen/recorder/ui/a;

.field private b:Landroid/widget/TextView;

.field private c:Lcom/esfile/screen/recorder/videos/edit/timepicker/TimePickerView;

.field private d:Lcom/esfile/screen/recorder/videos/edit/timepicker/TimePickerView;

.field private e:Landroid/widget/SeekBar;

.field private f:Landroid/widget/TextView;

.field private g:Landroid/content/Context;

.field private h:Lcom/esfile/screen/recorder/videos/edit/activities/speed/c$e;


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 3

    .line 1
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 2
    iput-object p1, p0, Lcom/esfile/screen/recorder/videos/edit/activities/speed/c;->g:Landroid/content/Context;

    .line 3
    new-instance v0, Lcom/esfile/screen/recorder/ui/a;

    invoke-direct {v0, p1}, Lcom/esfile/screen/recorder/ui/a;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/esfile/screen/recorder/videos/edit/activities/speed/c;->a:Lcom/esfile/screen/recorder/ui/a;

    .line 4
    invoke-virtual {p1}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;

    move-result-object v0

    invoke-static {v0}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object v0

    sget v1, Les/y4;->durec_video_edit_speed_dialog:I

    const/4 v2, 0x0

    .line 5
    invoke-virtual {v0, v1, v2}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v0

    .line 6
    iget-object v1, p0, Lcom/esfile/screen/recorder/videos/edit/activities/speed/c;->a:Lcom/esfile/screen/recorder/ui/a;

    invoke-virtual {v1, v0}, Lcom/esfile/screen/recorder/ui/a;->a(Landroid/view/View;)V

    .line 7
    invoke-direct {p0, v0}, Lcom/esfile/screen/recorder/videos/edit/activities/speed/c;->a(Landroid/view/View;)V

    .line 8
    iget-object v0, p0, Lcom/esfile/screen/recorder/videos/edit/activities/speed/c;->a:Lcom/esfile/screen/recorder/ui/a;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Lcom/esfile/screen/recorder/ui/a;->a(Z)V

    .line 9
    iget-object v0, p0, Lcom/esfile/screen/recorder/videos/edit/activities/speed/c;->a:Lcom/esfile/screen/recorder/ui/a;

    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Landroid/app/Dialog;->setCanceledOnTouchOutside(Z)V

    .line 10
    iget-object v0, p0, Lcom/esfile/screen/recorder/videos/edit/activities/speed/c;->a:Lcom/esfile/screen/recorder/ui/a;

    new-instance v1, Lcom/esfile/screen/recorder/videos/edit/activities/speed/c$a;

    invoke-direct {v1, p0}, Lcom/esfile/screen/recorder/videos/edit/activities/speed/c$a;-><init>(Lcom/esfile/screen/recorder/videos/edit/activities/speed/c;)V

    invoke-virtual {v0, v1}, Landroid/app/Dialog;->setOnCancelListener(Landroid/content/DialogInterface$OnCancelListener;)V

    .line 11
    invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    sget v1, Les/v4;->durec_caption_time_pick_width:I

    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I

    move-result v0

    .line 12
    invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    sget v2, Les/v4;->durec_caption_time_pick_margin:I

    invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I

    move-result v1

    .line 13
    invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object p1

    sget v2, Les/v4;->durec_dialog_padding:I

    invoke-virtual {p1, v2}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I

    move-result p1

    .line 14
    iget-object v2, p0, Lcom/esfile/screen/recorder/videos/edit/activities/speed/c;->a:Lcom/esfile/screen/recorder/ui/a;

    mul-int/lit8 v0, v0, 0x4

    mul-int/lit8 v1, v1, 0x3

    add-int/2addr v0, v1

    mul-int/lit8 p1, p1, 0x2

    add-int/2addr v0, p1

    invoke-virtual {v2, v0}, Lcom/esfile/screen/recorder/ui/a;->e(I)V

    return-void
.end method

.method private a(I)F
    .locals 2

    const/16 v0, 0x64

    .line 18
    invoke-static {v0, p1}, Ljava/lang/Math;->min(II)I

    move-result p1

    const/4 v0, 0x0

    invoke-static {p1, v0}, Ljava/lang/Math;->max(II)I

    move-result p1

    int-to-float p1, p1

    const/high16 v0, 0x42c80000    # 100.0f

    div-float/2addr p1, v0

    const/high16 v0, 0x3f000000    # 0.5f

    cmpl-float v1, p1, v0

    if-nez v1, :cond_0

    const/high16 p1, 0x3f800000    # 1.0f

    return p1

    :cond_0
    cmpg-float v0, p1, v0

    if-gez v0, :cond_1

    const/high16 v0, 0x3fc00000    # 1.5f

    mul-float p1, p1, v0

    const/high16 v0, 0x3e800000    # 0.25f

    add-float/2addr p1, v0

    return p1

    :cond_1
    const/high16 v0, 0x40000000    # 2.0f

    mul-float p1, p1, v0

    return p1
.end method

.method static synthetic a(Lcom/esfile/screen/recorder/videos/edit/activities/speed/c;I)F
    .locals 0

    .line 2
    invoke-direct {p0, p1}, Lcom/esfile/screen/recorder/videos/edit/activities/speed/c;->a(I)F

    move-result p0

    return p0
.end method

.method static synthetic a(Lcom/esfile/screen/recorder/videos/edit/activities/speed/c;)Lcom/esfile/screen/recorder/videos/edit/activities/speed/c$e;
    .locals 0

    .line 1
    iget-object p0, p0, Lcom/esfile/screen/recorder/videos/edit/activities/speed/c;->h:Lcom/esfile/screen/recorder/videos/edit/activities/speed/c$e;

    return-object p0
.end method

.method private a(Landroid/view/View;)V
    .locals 5

    .line 3
    sget v0, Les/x4;->durec_speed_dialog_title:I

    invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, p0, Lcom/esfile/screen/recorder/videos/edit/activities/speed/c;->b:Landroid/widget/TextView;

    .line 4
    sget v1, Les/z4;->durec_edit_change_speed:I

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(I)V

    .line 5
    sget v0, Les/x4;->start_time_picker:I

    invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Lcom/esfile/screen/recorder/videos/edit/timepicker/TimePickerView;

    iput-object v0, p0, Lcom/esfile/screen/recorder/videos/edit/activities/speed/c;->c:Lcom/esfile/screen/recorder/videos/edit/timepicker/TimePickerView;

    .line 6
    sget v0, Les/x4;->end_time_picker:I

    invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Lcom/esfile/screen/recorder/videos/edit/timepicker/TimePickerView;

    iput-object v0, p0, Lcom/esfile/screen/recorder/videos/edit/activities/speed/c;->d:Lcom/esfile/screen/recorder/videos/edit/timepicker/TimePickerView;

    .line 7
    sget v0, Les/x4;->neg_btn:I

    invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    .line 8
    new-instance v1, Lcom/esfile/screen/recorder/videos/edit/activities/speed/c$b;

    invoke-direct {v1, p0}, Lcom/esfile/screen/recorder/videos/edit/activities/speed/c$b;-><init>(Lcom/esfile/screen/recorder/videos/edit/activities/speed/c;)V

    invoke-virtual {v0, v1}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 9
    sget v0, Les/x4;->pos_btn:I

    invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    .line 10
    new-instance v1, Lcom/esfile/screen/recorder/videos/edit/activities/speed/c$c;

    invoke-direct {v1, p0}, Lcom/esfile/screen/recorder/videos/edit/activities/speed/c$c;-><init>(Lcom/esfile/screen/recorder/videos/edit/activities/speed/c;)V

    invoke-virtual {v0, v1}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 11
    sget v0, Les/x4;->min_speed:I

    invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    const/4 v1, 0x1

    new-array v2, v1, [Ljava/lang/Object;

    const/high16 v3, 0x3e800000    # 0.25f

    invoke-static {v3}, Ljava/lang/Float;->valueOf(F)Ljava/lang/Float;

    move-result-object v3

    const/4 v4, 0x0

    aput-object v3, v2, v4

    const-string v3, "%.2fx"

    invoke-static {v3, v2}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 12
    sget v0, Les/x4;->max_speed:I

    invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    new-array v1, v1, [Ljava/lang/Object;

    const/high16 v2, 0x40000000    # 2.0f

    invoke-static {v2}, Ljava/lang/Float;->valueOf(F)Ljava/lang/Float;

    move-result-object v2

    aput-object v2, v1, v4

    invoke-static {v3, v1}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 13
    sget v0, Les/x4;->cur_speed:I

    invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, p0, Lcom/esfile/screen/recorder/videos/edit/activities/speed/c;->f:Landroid/widget/TextView;

    .line 14
    sget v0, Les/x4;->speed_seek_bar:I

    invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object p1

    check-cast p1, Landroid/widget/SeekBar;

    iput-object p1, p0, Lcom/esfile/screen/recorder/videos/edit/activities/speed/c;->e:Landroid/widget/SeekBar;

    const/16 v0, 0x64

    .line 15
    invoke-virtual {p1, v0}, Landroid/widget/SeekBar;->setMax(I)V

    .line 16
    iget-object p1, p0, Lcom/esfile/screen/recorder/videos/edit/activities/speed/c;->e:Landroid/widget/SeekBar;

    const/high16 v0, 0x3f800000    # 1.0f

    invoke-direct {p0, v0}, Lcom/esfile/screen/recorder/videos/edit/activities/speed/c;->b(F)I

    move-result v0

    invoke-virtual {p1, v0}, Landroid/widget/SeekBar;->setProgress(I)V

    .line 17
    iget-object p1, p0, Lcom/esfile/screen/recorder/videos/edit/activities/speed/c;->e:Landroid/widget/SeekBar;

    new-instance v0, Lcom/esfile/screen/recorder/videos/edit/activities/speed/c$d;

    invoke-direct {v0, p0}, Lcom/esfile/screen/recorder/videos/edit/activities/speed/c$d;-><init>(Lcom/esfile/screen/recorder/videos/edit/activities/speed/c;)V

    invoke-virtual {p1, v0}, Landroid/widget/SeekBar;->setOnSeekBarChangeListener(Landroid/widget/SeekBar$OnSeekBarChangeListener;)V

    return-void
.end method

.method private b(F)I
    .locals 3

    const/high16 v0, 0x40000000    # 2.0f

    .line 2
    invoke-static {v0, p1}, Ljava/lang/Math;->min(FF)F

    move-result p1

    const/high16 v1, 0x3e800000    # 0.25f

    invoke-static {p1, v1}, Ljava/lang/Math;->max(FF)F

    move-result p1

    const/high16 v1, 0x3f800000    # 1.0f

    cmpl-float v2, p1, v1

    if-nez v2, :cond_0

    const/16 p1, 0x32

    return p1

    :cond_0
    cmpg-float v1, p1, v1

    if-gez v1, :cond_1

    mul-float p1, p1, v0

    const/high16 v0, 0x40400000    # 3.0f

    div-float/2addr p1, v0

    const v0, 0x3e2aaaab

    sub-float/2addr p1, v0

    const/high16 v0, 0x42c80000    # 100.0f

    :goto_0
    mul-float p1, p1, v0

    float-to-int p1, p1

    return p1

    :cond_1
    const/high16 v0, 0x42480000    # 50.0f

    goto :goto_0
.end method

.method static synthetic b(Lcom/esfile/screen/recorder/videos/edit/activities/speed/c;)Lcom/esfile/screen/recorder/ui/a;
    .locals 0

    .line 1
    iget-object p0, p0, Lcom/esfile/screen/recorder/videos/edit/activities/speed/c;->a:Lcom/esfile/screen/recorder/ui/a;

    return-object p0
.end method

.method static synthetic c(Lcom/esfile/screen/recorder/videos/edit/activities/speed/c;)Landroid/widget/SeekBar;
    .locals 0

    .line 1
    iget-object p0, p0, Lcom/esfile/screen/recorder/videos/edit/activities/speed/c;->e:Landroid/widget/SeekBar;

    return-object p0
.end method

.method static synthetic d(Lcom/esfile/screen/recorder/videos/edit/activities/speed/c;)Lcom/esfile/screen/recorder/videos/edit/timepicker/TimePickerView;
    .locals 0

    .line 1
    iget-object p0, p0, Lcom/esfile/screen/recorder/videos/edit/activities/speed/c;->c:Lcom/esfile/screen/recorder/videos/edit/timepicker/TimePickerView;

    return-object p0
.end method

.method static synthetic e(Lcom/esfile/screen/recorder/videos/edit/activities/speed/c;)Lcom/esfile/screen/recorder/videos/edit/timepicker/TimePickerView;
    .locals 0

    .line 1
    iget-object p0, p0, Lcom/esfile/screen/recorder/videos/edit/activities/speed/c;->d:Lcom/esfile/screen/recorder/videos/edit/timepicker/TimePickerView;

    return-object p0
.end method

.method static synthetic f(Lcom/esfile/screen/recorder/videos/edit/activities/speed/c;)Landroid/widget/TextView;
    .locals 0

    .line 1
    iget-object p0, p0, Lcom/esfile/screen/recorder/videos/edit/activities/speed/c;->f:Landroid/widget/TextView;

    return-object p0
.end method


# virtual methods
.method public a()V
    .locals 1

    .line 24
    iget-object v0, p0, Lcom/esfile/screen/recorder/videos/edit/activities/speed/c;->a:Lcom/esfile/screen/recorder/ui/a;

    invoke-virtual {v0}, Lcom/esfile/screen/recorder/ui/a;->show()V

    return-void
.end method

.method public a(F)V
    .locals 3

    const/high16 v0, 0x40000000    # 2.0f

    cmpl-float v0, p1, v0

    if-gtz v0, :cond_0

    const/high16 v0, 0x3e800000    # 0.25f

    cmpg-float v0, p1, v0

    if-ltz v0, :cond_0

    .line 19
    iget-object v0, p0, Lcom/esfile/screen/recorder/videos/edit/activities/speed/c;->e:Landroid/widget/SeekBar;

    invoke-direct {p0, p1}, Lcom/esfile/screen/recorder/videos/edit/activities/speed/c;->b(F)I

    move-result v1

    invoke-virtual {v0, v1}, Landroid/widget/SeekBar;->setProgress(I)V

    .line 20
    iget-object v0, p0, Lcom/esfile/screen/recorder/videos/edit/activities/speed/c;->f:Landroid/widget/TextView;

    const/4 v1, 0x1

    new-array v1, v1, [Ljava/lang/Object;

    const/4 v2, 0x0

    invoke-static {p1}, Ljava/lang/Float;->valueOf(F)Ljava/lang/Float;

    move-result-object p1

    aput-object p1, v1, v2

    const-string p1, "%.2fx"

    invoke-static {p1, v1}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object p1

    invoke-virtual {v0, p1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    return-void

    .line 21
    :cond_0
    new-instance p1, Ljava/lang/IllegalArgumentException;

    const-string v0, "speed should between 0.25~2.0"

    invoke-direct {p1, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V

    throw p1
.end method

.method public a(JJJ)V
    .locals 7

    .line 22
    iget-object v0, p0, Lcom/esfile/screen/recorder/videos/edit/activities/speed/c;->d:Lcom/esfile/screen/recorder/videos/edit/timepicker/TimePickerView;

    long-to-int p2, p1

    int-to-long v1, p2

    long-to-int p1, p3

    int-to-long v3, p1

    long-to-int p1, p5

    int-to-long v5, p1

    invoke-virtual/range {v0 .. v6}, Lcom/esfile/screen/recorder/videos/edit/timepicker/TimePickerView;->a(JJJ)V

    return-void
.end method

.method public a(Lcom/esfile/screen/recorder/videos/edit/activities/speed/c$e;)V
    .locals 0

    .line 23
    iput-object p1, p0, Lcom/esfile/screen/recorder/videos/edit/activities/speed/c;->h:Lcom/esfile/screen/recorder/videos/edit/activities/speed/c$e;

    return-void
.end method

.method public b(JJJ)V
    .locals 7

    .line 3
    iget-object v0, p0, Lcom/esfile/screen/recorder/videos/edit/activities/speed/c;->c:Lcom/esfile/screen/recorder/videos/edit/timepicker/TimePickerView;

    long-to-int p2, p1

    int-to-long v1, p2

    long-to-int p1, p3

    int-to-long v3, p1

    long-to-int p1, p5

    int-to-long v5, p1

    invoke-virtual/range {v0 .. v6}, Lcom/esfile/screen/recorder/videos/edit/timepicker/TimePickerView;->a(JJJ)V

    return-void
.end method
